#include <stdio.h>
#include <stdlib.h>

#define SIZE 9

int main(void)
{
     int arr[SIZE] = {0, 0, 0, 4, 5, 0, 7, 8, 9};
     int free = 0;
     for (int i = 0; i < SIZE; i++)
     {
          if (arr[i] != 0)
          {
               if (i != free)
               {
                    arr[free] = arr[i];
                    arr[i] = 0;
               }
               free++;
          }
     }
     for (int i = 0; i < SIZE; i++)
          printf("%d     ", arr[i]);
     printf("\n");
     return 0;
}
